package com.bit.java;

import java.util.Scanner;

public class Test3 {

    public static int Fun(int n) {
        if(n == 1 || n == 2) {
            return 1;
        }
        int a = 1;
        int b = 1;
        int c = 0;
        while((n-2) != 0) {
            c = a + b;
            a = b;
            b = c;
            n--;
        }
        return c;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int ret = scanner.nextInt();
        System.out.println(Fun(ret));
    }
}
